package net.stogi.unicore.beyond.ui.client.taskeditor.taskoutline;

import net.stogi.unicore.beyond.api.model.OutputGroup;

import com.google.gwt.event.shared.GwtEvent;

public class EditOutputGroupEvent extends GwtEvent<EditOutputGroupHandler> {

	public static final GwtEvent.Type<EditOutputGroupHandler> TYPE = new GwtEvent.Type<EditOutputGroupHandler>();

	private OutputGroup outputGroup;

	public EditOutputGroupEvent(OutputGroup outputGroup) {
		this.outputGroup = outputGroup;
	}

	@SuppressWarnings("unused")
	private EditOutputGroupEvent() {}

	@Override
	public Type<EditOutputGroupHandler> getAssociatedType() {
		return TYPE;
	}

	public OutputGroup getOutputGroup() {
		return outputGroup;
	}

	public void setOutputGroup(OutputGroup outputGroup) {
		this.outputGroup = outputGroup;
	}

	@Override
	protected void dispatch(EditOutputGroupHandler handler) {
		handler.onEditOutputGroup(this);
	}
}
